package com.yun.controller;

import com.yun.entities.Account;
import com.yun.service.AccountService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

@CrossOrigin("*")
@RestController
@Slf4j
@ResponseBody
@RequestMapping(value = "account")
public class AccountController {
    @Autowired
    private AccountService accountService;


    @RequestMapping(value = "getAllById")
    public Account getAllById(Integer accId){
        log.info("进入AccountController并开始执行");
        log.info("查询到的数据为：{}" , accountService.queryById(accId));
        return accountService.queryById(accId);
    }

}
